<%-- 
    Document   : Employee
    Created on : May 9, 2012, 9:28:43 AM
    Author     : Nguyen Hung
--%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<%@taglib prefix="rich" uri="http://richfaces.org/rich" %>
<%@taglib prefix="a4j" uri="http://richfaces.org/a4j" %>
<html>
    <head>
        <script type="text/javascript" language="javascript" src="../scripts/jQuery/jquery.rateit.js"></script>
        <script type="text/javascript" language="javascript" src="../scripts/jQuery/confirm.js"></script>
        <script type="text/javascript" language="javascript" src="../scripts/jQuery/jquery.fancybox-1.3.4.pack.js"></script>        <!-- -->
        <link rel="stylesheet" type="text/css" href="../css/rateit.css">
        <link rel="stylesheet" type="text/css" href="../scripts/tabs/slidingtabs-horizontal.css">
        <script type="text/javascript" src="../scripts/tabs/slidetab.js"></script>
        <!-- -->
        <script type="text/javascript" language="javascript">
            var open_cur = 0;
            $j = jQuery.noConflict();
            $j(document).ready(function(){
                
                $j('.st_horizontal').slideTabs();
                Tab4Kapi();
                $j('a.button.edit').live('click',function() {
                     
                    $j(this).parent("div").parent("div").hide().next("div").show();
                    
                });
                $j('.button_cancel').live('click',function() {
                    $j(this).parent("div").parent("div").parent("div").hide();
                    $j(this).parent("div").parent("div").parent("div").prev("div").show();
                   
                    
                });
            
                $j('.button_cancel2').live('click',function() {
                    $j(this).parent("div").parent("div").hide();
                    $j(this).parent("div").parent("div").prev("div").show();
                   
                    
                });
                $j(".rateit").live("click",function(){
           
                        pn100 = $j(this).prev().attr('id');
                        star_value = $j(this).prev().val();
                        $j.post("star.jsp?action=favourite&flag=star&ni105="+star_value+'&pn100='+pn100,function(){
                        
                    });
                     
                  
          
                });
               
               
               

            });
        </script>
    </head>


    <body>
        <f:loadBundle basename="#{environmentSession.localizationSource}" var="locale"/>
        <div id="content">
            <div id="menu_top">
                <div class="dropdown">
                    <div class="select_choise">
                        <a href="#"><span>Khu vực</span></a>
                    </div>
                    <div class="select_hidden">
                        <ul>

                            <li><a href="#"><span>Filter Cấp 3</span></a></li>
                            <li><a href="#"><span>Filter Cấp 3</span></a></li>
                        </ul>
                    </div>
                </div>
                <div class="dropdown">
                    <div class="select_choise">
                        <a href="#"><span>Outlets</span></a>
                    </div>
                    <div class="select_hidden">
                        <ul>
                            <li><a href="#"><span>Ban Điều Hành</span></a></li>
                            <li><a href="#"><span>Nhóm IT</span></a></li>
                            <li><a href="#"><span>Filter Cấp 3</span></a></li>
                        </ul>
                    </div>
                </div>
            </div>
            <div id="content_detail">
                <div class="sidebar">
                    <a href="customerInput.jsp?action=addEmp&table=A&height=300px&width=400px" class="fancybox add_new" id="fancybox">
                        <span><h:outputText value="#{locale.addCustomer}"/>
                        </span>
                    </a>

                    <div class="search_box">
                        <form action="" method="get">
                            <h3><h:outputText value="#{locale.search}"/></h3>
                            <div class="fields_input">
                                <input name="" type="text"  value="<h:outputText value="#{locale.search_key}"/>..." onblur="if(this.value=='')this.value='<h:outputText value="#{locale.search_key}"/>...';" onfocus="if(this.value=='<h:outputText value="#{locale.search_key}"/>...')this.value='';" />
                                <input name="" type="submit" value="OK" />
                            </div>
                        </form>
                        <h4><h:outputText value="#{locale.advance_search}"/></h4>
                        <div class="fields_select">
                            <select name="">
                                <option><h:outputText value="#{locale.group}"/> / <h:outputText value="#{locale.Departments}"/></option>
                            </select>
                        </div>
                        <div class="fields_select">
                            <select name="">
                                <option><h:outputText value="#{locale.sex}"/>...</option>
                            </select>
                        </div>
                        <div class="fields_select">
                            <select name="">
                                <option><h:outputText value="#{locale.position}"/>...</option>
                            </select>
                        </div>
                        <div class="fields_select">
                            <select name="">
                                <option><h:outputText value="#{locale.income}"/>...</option>
                            </select>
                        </div>
                        <div class="fields_submit">
                            <input name="" type="submit" value="<h:outputText value="#{locale.search_option}"/>" />
                        </div>
                    </div>
                </div>
                <div class="content_right">
                    <div class="fillter">
                        <div class="dropdown">
                            <div class="select_choise s3">
                              
                                    <a href="customer.jsp?type=1"><span><h:outputText value="#{locale.normal_customer}"/></span></a>
                      

                            </div>
                            <div class="select_hidden">
                                <ul>
                                        <li class="s31"  <h:outputText rendered="#{CustomerBean.ni104 == 0}" value="style='display:none'" /> >
                                            <a href="cuscompany.jsp?type=0"><span><h:outputText value="#{locale.hiddencustomer}"/></span></a>
                                        </li>
                                         <li class="s32" <h:outputText rendered="#{CustomerBean.ni104 == 1}" value="style='display:none'" /> >
                                             <a href="cuscompany.jsp"><span><h:outputText value="#{locale.normal_customer}"/></span></a>
                                         </li>

                                </ul>
                            </div>
                        </div>
                    </div>
                    <a4j:form>
                        <div class="content">
                            <div class="title">
                                <h2><h:outputText value="#{locale.listCustomer}"/></h2>
                                <div class="sort">
                                    <div class="sort_num">
                                        <a href="#"><span><h:outputText value="#{locale.num1}"/></span></a>
                                    </div>
                                    <div class="sort_char">
                                        <%--  <a4j:repeat value="#{EmpBean.listAlpha}" var="item">
                                              <h:commandLink action="#{EmpBean.searchAlpha}">
                                                  <h:outputText value="#{item.alpha}" />
                                                  <f:param value="#{item.alpha}" name="idSearch"></f:param>
                                              </h:commandLink>

                                        </a4j:repeat>--%>
                                        <jsp:include page="../../common/search.jsp"/>

                                    </div>
                                </div>
                            </div>
                            <!-- Strart list Content -->
                            <div class="list_content">
                                <a4j:repeat value="#{CustomerBean.listCustomer}" var="item" rowKeyVar="index">
                                    <div class="item">
                                        <div class="fields_id">
                                            <h:outputText value="#{index+1}">
                                                <f:convertNumber  pattern="##000"></f:convertNumber>
                                            </h:outputText>
                                        </div>
                                        <div class="fields_avatar">
                                            <img  src="../images/3.png" alt="" />
                                        </div>
                                        <div class="fields_info">
                                            <h2><a><h:outputText value="#{item.nv102} #{item.nv103} (#{item.old})"/></a></h2>
                                            <h2><h:outputLink value="cuscompany.jsp?pnPK100=#{item.fk100}&type=#{item.kn114}"><span style="font-size: 10px;line-height: 16px;font-weight: bold;font-style: italic;">CTy <h:outputText value="#{item.kv101}"/></span></h:outputLink> </h2>
                                            <h3><a><h:outputText value="#{item.nv111}"/></a></h3>
                                            <h3><a><h:outputText value="#{item.nv107}"/> </a> | <a ><h:outputText value="#{item.nv110}"/></a></h3>

                                        </div>
                                        <div class="rating_star">
                                            <input type="range" value="<h:outputText value='#{item.ni105}'/>" name="<h:outputText value='#{item.pn100}' />" step="1" id="<h:outputText value='#{item.pn100}'/>">
                                            <div class="rateit" data-rateit-backingfld="#<h:outputText value='#{item.pn100}'/>" data-rateit-resetable="false" data-rateit-ispreset="true"
                                                 data-rateit-min="0" data-rateit-max="5">
                                            </div>
                                        </div>
                                        <div class="fields_contact">

                                            <h2>Phone: <h:outputText value="#{item.nv967}"/> <a><img src="../images/icon1.png" alt="" /></a> <a href="#"><img src="../images/icon2.png" alt="" /></a></h2>
                                            <h3>Email:<a href=""> <h:outputText value="#{item.nv962}"/></a></h3>
                                            <h3><span> <img  src="../images/intro.png" alt="edit" title="edit" /></span><h:outputText value="#{item.gthieu}" style="color:#425363;font-weight:bold;"/></h3>

                                            <h3> <h:outputLink value="changeperson.jsp?id=#{item.pn100}&fn850=#{item.fn850}&qv101=#{item.nv113}&flag=N100&height=150px&width=300px" styleClass="fancybox add_new" id="fancyboxff">
                                                    <span>
                                                        <img  src="../images/icon7.png" alt="edit" title="edit" />
                                                        <h:outputText value="#{item.tnhiem}" style="color:#425363;font-weight:bold;"/>
                                                    </span>
                                                </h:outputLink>
                                            </h3>


                                        </div>
                                        <div class="fields_more" lang="<h:outputText value="#{item.pn100}"/>">
                                            <h:outputText styleClass="more" value="#{locale.detail}" />
                                        </div>
                                        <div class="fields_edit">
                                            <h:outputLink value="customerInput.jsp?action=editEmp&pn100=#{item.pn100}&table=A&height=300px&width=400px" styleClass="fancybox add_new" id="fancybox">
                                                <img title="edit" alt="edit" src="../images/edit.png">
                                                <f:param value="#{item.pn100}" name="pn100"></f:param>

                                            </h:outputLink>
                                            <%--  <a onclick="qbShowdialog(<h:outputText value="#{item.pn100}"/>);">  <img src="../images/icon4.png" alt="delete"  title="delete" /></a>--%>
                                            <h:outputLink value="deleteCustomer.jsp?action=delete&pn100=#{item.pn100}&table=A&height=300px&width=400px" styleClass="fancybox add_new" id="fancyboxd">
                                                <img src="../images/delete_1.png" alt="delete"  title="delete" />
                                            </h:outputLink>

                                        </div>
                                    </div>
                                    <div class="tabs_menu">
                                        <div id="st_horizontal" class="st_horizontal">
                                            <div class="st_tabs_container st_sliding_active">
                                                <a href="#prev" class="st_prev" style="display: inline;"></a>
                                                <div class="st_slide_container">
                                                    <ul class="st_tabs">
                                                        <li   class="st_tab  tab1<h:outputText value='#{item.pn100}'/>"
                                                              id="<h:outputText value="#{item.pn100}"/>"
                                                              lang="contactInfoDetails.jsp"><h:outputText value="#{locale.contact_info}"/><a class="st_tab_active" ></a>
                                                        </li>                                                                                                
                                                        <li  class="st_tab tab3<h:outputText value='#{item.pn100}'/>"
                                                             id="<h:outputText value="#{item.pn100}"/>"
                                                             lang="personalInfoDetails.jsp"><h:outputText value="#{locale.person_info}"/><a  ></a></li>

                                                        <li lang="workCharge.jsp"  class="st_tab tab4<h:outputText value='#{item.pn100}'/>"
                                                            id="<h:outputText value="#{item.pn100}"/>"><h:outputText value="#{locale.work_charge}"/><a ></a></li>
                                                        <li lang="commingsoon.jsp" class="st_tab tab5"><h:outputText value="#{locale.history_tour}"/><a ></a></li>
                                                       <li class="st_tab tab6<h:outputText value='#{item.pn100}'/>"
                                                             id="<h:outputText value="#{item.pn100}"/>"
                                                             lang="documentdetail.jsp"><h:outputText value="#{locale.document}"/> <a></a> </li>
                                                        <li lang="commingsoon.jsp"  class="st_tab tab7"><h:outputText value="#{locale.acount_info}"/><a ></a></li>



                                                    </ul>
                                                </div> <!-- /.st_slide_container -->
                                                <a style="display: inline;" href="#next" class="st_next st_btn_disabled"></a>
                                            </div> <!-- /.st_tabs_container -->
                                            <div class="item_description"></div>
                                        </div>
                                    </div>
                                    <%--
                                                                        <div class="item_detail">
                                                                            <ul class="item_tab tab1<h:outputText value='#{item.pn100}'/>" id="<h:outputText value="#{item.pn100}"/>" title="page" lang="contactInfoDetails.jsp"><h:outputText value="#{locale.contact_info}"/></ul>
                                                                            <ul class="item_tab tab3<h:outputText value='#{item.pn100}'/>" id="<h:outputText value="#{item.pn100}"/>" title="page" lang="personalInfoDetails.jsp" ><h:outputText value="#{locale.person_info}"/></ul>
                                                                            <ul class="item_tab tab3<h:outputText value='#{item.pn100}'/>" id="<h:outputText value="#{item.pn100}"/>" lang="personalInfoDetails.jsp" ><h:outputText value="Bookings"/></ul>
                                                                            <ul class="item_tab tab2<h:outputText value='#{item.pn100}'/>" id="<h:outputText value="#{item.pn100}"/>" lang="personalInfoDetails.jsp" ><h:outputText value="Tài liệu lưu"/></ul>
                                                                            <ul class="item_tab tab4<h:outputText value='#{item.pn100}'/>" id="<h:outputText value="#{item.pn100}"/>" lang="personalInfoDetails.jsp" ><h:outputText value="Lịch sử KH"/></ul>
                                                                            <ul class="item_tab tab3<h:outputText value='#{item.pn100}'/>" id="<h:outputText value="#{item.pn100}"/>" lang="personalInfoDetails.jsp" ><h:outputText value="Lịch sử Tours"/></ul>
                                                                            <div class="item_description">description</div>
                                                                        </div>--%>
                                    <%-- Showdialog delete Employe
                                    <div id="overlay" class="web_dialog_overlay"></div>
                                    <div id="dialog<h:outputText value="#{item.pn100}"/>" class="web_dialog">
                                        <div class="web_dialog_title">
                                            <h:outputText value="#{locale.delete_employee}" styleClass="textdelete"/>
                                            <a href="#" id="btnClose" onclick="HideDialog(<h:outputText value='#{item.pn100}'/>);">Close</a>
                                        </div>
                                        <div class="dialog_content">
                                            <h:outputText value="#{locale.confirm}"/>
                                        </div>
                                        <div class="dialog_submit">

                                            <div  class="no" onclick="HideDialog(<h:outputText value='#{item.pn100}'/>);">  

                                            </div>

                                            <h:commandButton action="#{EmpBean.deleteEmployee}" styleClass="yes">  
                                                <f:param name="pn100" value="#{item.pn100}"/>
                                            </h:commandButton>
                                        </div>
                                    </div>
                                    --%>
                                </a4j:repeat>

                            </div>
                            <!-- End List Content-->    
                        </div>
                        <rich:modalPanel id="ajaxLoadingModalBox" minHeight="30" minWidth="40"
                                         height="30" width="40" zindex="2000">
                            <h:outputText value="#{locale.please_wait}" styleClass="startDummer"></h:outputText>
                        </rich:modalPanel>
                    </a4j:form>
                </div>
            </div>
        </div>

    </body>
</html>
